<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>全局混入</title>
</head>
<body>
<div id="app">

</div>

<script type="module">
    import {createApp, ref} from "../../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup() {
                let message = "Hi, Vue！"
                return {
                    message,
                }
            },

            myOptions: "Hello, World!",
        }
    )

    app.mixin(
        {
            created() {
                console.log("调用了 生命周期钩子 created 函数");

                // console.log(this);
                // console.log(this.$options);
                console.log(this.$options.myOptions);

                // console.log(this);
                console.log(this.message);

            }
        }
    )

    app.mount("#app")
</script>
</body>
</html>